home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / Xm / Uil.z / Uil
Text File  |  1998-10-30  |  15KB  |  331 lines

  1.  
  2.  
  3.  
  4.      UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))         UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV         UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           UUUUiiiillll - Invokes the UIL compiler from within an application
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           #include <uil/UilDef.h>
  13.  
  14.           UUUUiiiillll____ssssttttaaaattttuuuussss____ttttyyyyppppeeee UUUUiiiillll(
  15.           UUUUiiiillll____ccccoooommmmmmmmaaaannnndddd____ttttyyyyppppeeee ****ccccoooommmmmmmmaaaannnndddd____ddddeeeesssscccc,
  16.           UUUUiiiillll____ccccoooommmmppppiiiilllleeee____ddddeeeesssscccc____ttttyyyyppppeeee ********ccccoooommmmppppiiiilllleeee____ddddeeeesssscccc,
  17.           UUUUiiiillll____ccccoooonnnnttttiiiinnnnuuuueeee____ttttyyyyppppeeee ((((****mmmmeeeessssssssaaaaggggeeee____ccccbbbb) (),
  18.           cccchhhhaaaarrrr ****mmmmeeeessssssssaaaaggggeeee____ddddaaaattttaaaa,
  19.           UUUUiiiillll____ccccoooonnnnttttiiiinnnnuuuueeee____ttttyyyyppppeeee ((((****ssssttttaaaattttuuuussss____ccccbbbb) (),
  20.           cccchhhhaaaarrrr ****ssssttttaaaattttuuuussss____ddddaaaattttaaaa);
  21.  
  22.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  23.           This page documents Motif 2.1.
  24.  
  25.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  26.           The UUUUiiiillll function provides a callable entry point for the UIL
  27.           compiler. The UUUUiiiillll callable interface can be used to process
  28.           a UIL source file and to generate UID files, as well as
  29.           return a detailed description of the UIL source module in
  30.           the form of a symbol table (parse tree).
  31.  
  32.           _c_o_m_m_a_n_d__d_e_s_c
  33.                     Specifies the uuuuiiiillll command line.
  34.  
  35.           _c_o_m_p_i_l_e__d_e_s_c
  36.                     Returns the results of the compilation.
  37.  
  38.           _m_e_s_s_a_g_e__c_b
  39.                     Specifies a callback function that is called when
  40.                     the compiler encounters errors in the UIL source.
  41.  
  42.           _m_e_s_s_a_g_e__d_a_t_a
  43.                     Specifies user data that is passed to the message
  44.                     callback function (_m_e_s_s_a_g_e__c_b). Note that this
  45.                     argument is not interpreted by UIL, and is used
  46.                     exclusively by the calling application.
  47.  
  48.           _s_t_a_t_u_s__c_b Specifies a callback function that is called to
  49.                     allow X applications to service X events such as
  50.                     updating the screen. This function is called at
  51.                     various check points, which have been hard coded
  52.                     into the UIL compiler.  The _s_t_a_t_u_s__u_p_d_a_t_e__d_e_l_a_y
  53.                     argument in _c_o_m_m_a_n_d__d_e_s_cspecifies the number of
  54.                     check points to be passed before the _s_t_a_t_u_s__c_b
  55.                     function is invoked.
  56.  
  57.           _s_t_a_t_u_s__d_a_t_a
  58.                     Specifies user data that is passed to the status
  59.                     callback function (_s_t_a_t_u_s__c_b).Note that this
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 10/24/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))         UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV         UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
  71.  
  72.  
  73.  
  74.                     argument is not interpreted by the UIL compiler
  75.                     and is used exclusively by the calling
  76.                     application.
  77.  
  78.           Following are the data structures _U_i_l__c_o_m_m_a_n_d__t_y_p_e and
  79.           _U_i_l__c_o_m_p_i_l_e__d_e_s_c__t_y_p_e:
  80.  
  81.           typedef struct Uil_command_type {
  82.           char *source_file;
  83.               /* single source to compile */
  84.           char *resource_file; /* name of output file */
  85.           char *listing_file; /* name of listing file */
  86.           unsigned int *include_dir_count;
  87.               /* number of dirs. in include_dir */
  88.           char *((*include_dir) []);
  89.               /* dir. to search for include files */
  90.           unsigned listing_file_flag: 1;
  91.               /* produce a listing */
  92.           unsigned resource_file_flag: 1;
  93.               /* generate UID output */
  94.           unsigned machine_code_flag: 1;
  95.               /* generate machine code */
  96.           unsigned report_info_msg_flag: 1;
  97.               /* report info messages */
  98.           unsigned report_warn_msg_flag: 1;
  99.               /* report warnings */
  100.           unsigned parse_tree_flag: 1;
  101.               /* generate parse tree */
  102.           unsigned int status_update_delay;
  103.               /* number of times a status point is */
  104.               /* passed before calling status_cb */
  105.               /* function 0 means called every time */
  106.           char *database;
  107.               /* name of database file */
  108.           unsigned database_flag: 1;
  109.               /* read a new database file */
  110.           unsigned use_setlocale_flag: 1;
  111.               /* enable calls to setlocale */
  112.           };
  113.           typedef struct Uil_compile_desc_type {
  114.           unsigned int compiler_version;
  115.               /* version number of compiler */
  116.           unsigned int data_version;
  117.               /* version number of structures */
  118.           char *parse_tree_root; /* parse tree output */
  119.           unsigned int message_count [Uil_k_max_status+1];
  120.           /* array of severity counts */
  121.           };
  122.  
  123.           Following is a description of the message callback function
  124.           specified by _m_e_s_s_a_g_e__c_b:
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 10/24/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))         UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV         UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
  137.  
  138.  
  139.  
  140.           Uil_continue_type (*_m_e_s_s_a_g_e__c_b) (_m_e_s_s_a_g_e__d_a_t_a, _m_e_s_s_a_g_e__n_u_m_b_e_r, _s_e_v_e_r_i_t_y, _m_s_g__b_u_f_f_e_r,
  141.           _s_r_c__b_u_f_f_e_r, _p_t_r__b_u_f_f_e_r, _l_o_c__b_u_f_f_e_r, _m_e_s_s_a_g_e__c_o_u_n_t)
  142.                   char *_m_e_s_s_a_g_e__d_a_t_a;
  143.                   int _m_e_s_s_a_g_e__n_u_m_b_e_r;
  144.                   int _s_e_v_e_r_i_t_y;
  145.                   char *_m_s_g__b_u_f_f_e_r, *_s_r_c__b_u_f_f_e_r;
  146.                   char *_p_t_r__b_u_f_f_e_r, *_l_o_c__b_u_f_f_e_r;
  147.                   int _m_e_s_s_a_g_e__c_o_u_n_t[];
  148.  
  149.           This function specifies a callback function that UIL invokes
  150.           instead of printing an error message when the compiler
  151.           encounters an error in the UIL source.  The callback should
  152.           return one of the following values:
  153.  
  154.           _U_i_l__k__t_e_r_m_i_n_a_t_e
  155.                     Terminate processing of the source file
  156.  
  157.           _U_i_l__k__c_o_n_t_i_n_u_e
  158.                     Continue processing the source file
  159.  
  160.           The arguments are
  161.  
  162.           _m_e_s_s_a_g_e__d_a_t_a
  163.                     Data supplied by the application as the
  164.                     _m_e_s_s_a_g_e__d_a_t_a argument to the UUUUiiiillll function.  UIL
  165.                     does not interpret this data in any way; it just
  166.                     passes it to the callback.
  167.  
  168.           _m_e_s_s_a_g_e__n_u_m_b_e_r
  169.                     An index into a table of error messages and
  170.                     severities for internal use by UIL.
  171.  
  172.           _s_e_v_e_r_i_t_y  An integer that indicates the severity of the
  173.                     error.  The possible values are the status
  174.                     constants returned by the UUUUiiiillllfunction.  See RRRReeeettttuuuurrrrnnnn
  175.                     VVVVaaaalllluuuueeee for more information.
  176.  
  177.           _m_s_g__b_u_f_f_e_r
  178.                     A string that describes the error.
  179.  
  180.           _s_r_c__b_u_f_f_e_r
  181.                     A string consisting of the source line where the
  182.                     error occurred.  This string is not always
  183.                     available. In this case, the argument is NULL.
  184.  
  185.           _p_t_r__b_u_f_f_e_r
  186.                     A string consisting of whitespace and a printing
  187.                     character in the character position corresponding
  188.                     to the column of the source line where the error
  189.                     occurred.  This string may be printed beneath the
  190.                     source line to provide a visual indication of the
  191.                     column where the error occurred.  This string is
  192.  
  193.  
  194.  
  195.      Page 3                                         (printed 10/24/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))         UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV         UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
  203.  
  204.  
  205.  
  206.                     not always available. In this case, the argument
  207.                     is NULL.
  208.  
  209.           _l_o_c__b_u_f_f_e_r
  210.                     A string identifying the line number and file of
  211.                     the source line where the error occurred.  This is
  212.                     not always available; the argument is then NULL.
  213.  
  214.           _m_e_s_s_a_g_e__c_o_u_n_t
  215.                     An array of integers containing the number of
  216.                     diagnostic messages issued thus far for each
  217.                     severity level.  To find the number of messages
  218.                     issued for the current severity level, use the
  219.                     _s_e_v_e_r_i_t_y argument as the index into this array.
  220.  
  221.           Following is a description of the status callback function
  222.           specified by _s_t_a_t_u_s__c_b:
  223.  
  224.           Uil_continue_type (*_s_t_a_t_u_s__c_b) (_s_t_a_t_u_s__d_a_t_a, _p_e_r_c_e_n_t__c_o_m_p_l_e_t_e,
  225.                   _l_i_n_e_s__p_r_o_c_e_s_s_e_d, _c_u_r_r_e_n_t__f_i_l_e, _m_e_s_s_a_g_e__c_o_u_n_t)
  226.                   char *_s_t_a_t_u_s__d_a_t_a;
  227.                   int _p_e_r_c_e_n_t__c_o_m_p_l_e_t_e;
  228.                   int _l_i_n_e_s__p_r_o_c_e_s_s_e_d;
  229.                   char *_c_u_r_r_e_n_t__f_i_l_e;
  230.                   int _m_e_s_s_a_g_e__c_o_u_n_t[];
  231.  
  232.           This function specifies a callback function that is invoked
  233.           to allow X applications to service X events such as updating
  234.           the screen.  The callback should return one of the following
  235.           values:
  236.  
  237.           _U_i_l__k__t_e_r_m_i_n_a_t_e
  238.                     Terminate processing of the source file
  239.  
  240.           _U_i_l__k__c_o_n_t_i_n_u_e
  241.                     Continue processing the source file
  242.  
  243.           The arguments are
  244.  
  245.           _s_t_a_t_u_s__d_a_t_a
  246.                     Data supplied by the application as the
  247.                     _s_t_a_t_u_s__d_a_t_a argument to the UUUUiiiillll function.  UIL
  248.                     does not interpret this data in any way; it just
  249.                     passes it to the callback.
  250.  
  251.           _p_e_r_c_e_n_t__c_o_m_p_l_e_t_e
  252.                     An integer indicating what percentage of the
  253.                     current source file has been processed so far.
  254.  
  255.           _l_i_n_e_s__p_r_o_c_e_s_s_e_d
  256.                     An integer indicating how many lines of the
  257.                     current source file have been read so far.
  258.  
  259.  
  260.  
  261.      Page 4                                         (printed 10/24/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))         UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV         UUUUiiiillll((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
  269.  
  270.  
  271.  
  272.           _c_u_r_r_e_n_t__f_i_l_e
  273.                     A string containing the pathname of the current
  274.                     source file.
  275.  
  276.           _m_e_s_s_a_g_e__c_o_u_n_t
  277.                     An array of integers containing the number of
  278.                     diagnostic messages issued thus far for each
  279.                     severity level.  To find the number of messages
  280.                     issued for a given severity level, use the
  281.                     severity level as the index into this array.  The
  282.                     possible severity levels are the status constants
  283.                     returned by the UUUUiiiillll function.  See RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeee
  284.                     for more information.
  285.  
  286.      RRRREEEETTTTUUUURRRRNNNN
  287.           This function returns one of the following status return
  288.           constants:
  289.  
  290.           _U_i_l__k__s_u_c_c_e_s_s__s_t_a_t_u_s
  291.                     The operation succeeded.
  292.  
  293.           _U_i_l__k__i_n_f_o__s_t_a_t_u_s
  294.                     The operation succeeded. An informational message
  295.                     is returned.
  296.  
  297.           _U_i_l__k__w_a_r_n_i_n_g__s_t_a_t_u_s
  298.                     The operation succeeded. A warning message is
  299.                     returned.
  300.  
  301.           _U_i_l__k__e_r_r_o_r__s_t_a_t_u_s
  302.                     The operation failed due to an error.
  303.  
  304.           _U_i_l__k__s_e_v_e_r_e__s_t_a_t_u_s
  305.                     The operation failed due to an error.
  306.  
  307.      RRRREEEELLLLAAAATTTTEEEEDDDD
  308.           UUUUiiiillllDDDDuuuummmmppppSSSSyyyymmmmbbbboooollllTTTTaaaabbbblllleeee(3) and uuuuiiiillll(1).
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                                         (printed 10/24/98)
  328.  
  329.  
  330.  
  331.